The primary purpose of MiscAgent is to simplify the lazy loading and initialization of resources by using the responder chain to intercept messages.
[Does "resources" basically mean either a nib or a bundle, plus its constituents?]
Is that correct? I think this is a great idea, but I'm not yet sure if its time has come. My primary concerns are:
1) how does the object know which classes implement which methods before loading.
2) how to manage lots of overlapping, dynamically added classes ("implicit programming" - I like the term!)
3) How to make this have no more overhead than direct connections?
I think we are all agreed that the goal is to simplify the programmers job for doing lazy initialization. However, I think it needs to be as easy to setup a MiscAgent connection as it is to perform a direct connection. If one needs to parse the nib, create a subclass, and resolve conflicts manually, much of the advantage will be lost.
I do agree this is a separate issue from the (much better defined) MiscDoc question (which I have promised Don to work on, but haven't yet :-().
I suspect that if we are to find a truly usable suggestion, it would be best to start with an existing situation and work to abstract it. Two classes that come to mind are MiscNibController and MiscInfoController. If we can abstract their common behavior into a class MiscAgent which (through delegates, subclases, or bundles) is as easy to use as the original classes, I think we will have a winner.
Thanks for taking the time to think this through, Chris!
- Ernie P.
---
Ernest N. Prabhakar Caltech High Energy Physics
Member, League for Programming Freedom (league@prep.ai.mit.edu)
CaJUN President NeXTMail:ernest@pundit.cithep.caltech.edu
"...and ourselves, your servants for Jesus' sake." - II Cor 4:5b